#ifndef __Enemy_h_
#define __Enemy_h_

#include "Character.h"
#include "MovableItem.h"

class MainCharacter;
class Weapon;

class Enemy : public Character, public MovableItem, public Ogre::FrameListener
{

	friend class GameManager;

	// Attributes ------------------------------------------------------------------------------
public:
	static const char* DEFAULT_NODE_NAME;
	enum TypeEnemy 
	{
		XP,
		VISTA,
		WIN311,
		WIN2000,
		WIN98,
		WIN95,
		WINME,
		APPLE,
		HOLE
	};

protected:
	Ogre::Real mDistance;
	Ogre::Vector3 mDirection;
	Ogre::Vector3 mDestination;
	Ogre::Real mTimeUntilNextBullet;
	Weapon* weapon;
	static int ID;
	static const char* DEFAULT_NAME;
	Ogre::ParticleSystem* pSys2;
	int nbTouch;
	TypeEnemy type;
	unsigned int desintegrSoundId;

	// Methods ---------------------------------------------------------------------------------
protected:	
	Enemy();
	virtual ~Enemy();
	virtual void initNbTouch()=0;
	//virtual void initialize();

public:
	virtual void collision(Item* _item);
	virtual void collisionWithBullet(Bullet* _bullet);
	virtual void collisionWithEnemy(Enemy* _enemy);
	virtual void collisionWithMainCharacter(MainCharacter* _mainCharacter);
	virtual void collisionWithFish(Fish * _fish);
	virtual void collisionWithBonus(Bonus* _bonus);
	virtual void collisionWithWeapon(Weapon* weapon);
	virtual bool move();
	virtual bool frameStarted(const Ogre::FrameEvent& evt);
	void renewDestination();
	bool nextLocation();
	void reset();
	virtual const TypeEnemy& getTypeEnemy() const { return type; }

};

#endif